package com.gopay.common.constants.bt;

/**
 * 大宗收益计算--收益类型 枚举类
 * 
 * @BtGainsType.java
 * @author wanggang
 * @2013-8-13 下午2:45:35 www.gopay.com.cn Inc.All rights reserved.
 */
public enum BtGainsType {

    /**
     * 固定收益
     */
    FIXED("0"),

    /**
     * 区间收益
     */
    INTERVAL("1");

    public final String value;

    private BtGainsType(String value) {
        this.value = value;
    }

    /**
     * 根据枚举类型的字符串值 获取 相应的枚举变量
     */
    public static BtGainsType get(String btGainsType) {
        BtGainsType[] bgts = BtGainsType.class.getEnumConstants();
        for (BtGainsType bgt : bgts) {
            if (bgt.value.equals(btGainsType)) {
                return bgt;
            }
        }
        return null;
    }
}
